package com.jinhua.huaojbackendquestionservice.service;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jinhua.huaojbackendmodel.model.dto.questionSubmit.QuestionSubmitAddRequest;
import com.jinhua.huaojbackendmodel.model.dto.questionSubmit.QuestionSubmitQueryRequest;
import com.jinhua.huaojbackendmodel.model.entity.QuestionSubmit;
import com.jinhua.huaojbackendmodel.model.entity.User;
import com.jinhua.huaojbackendmodel.model.vo.QuestionSubmitVO;

import javax.servlet.http.HttpServletRequest;

/**
* @author 20289
* @description 针对表【question_submit(题目提交)】的数据库操作Service
* @createDate 2024-09-28 13:44:09
*/
public interface QuestionSubmitService extends IService<QuestionSubmit> {
    /**
     * 题目提交
     * @param questionSubmitAddRequest 做题参数
     * @param request                   获取登陆用户
     * @return
     */
    Long doQuestionSubmit(QuestionSubmitAddRequest questionSubmitAddRequest, User request);

    /**
     * 获取查询条件
     *
     * @param questionSubmitQueryRequest
     * @return
     */
    QueryWrapper<QuestionSubmit> getQueryWrapper(QuestionSubmitQueryRequest questionSubmitQueryRequest);
    /**
     * 获取题目提交封装
     *
     * @param questionSubmit
     * @param request
     * @return
     */
    QuestionSubmitVO getQuestionSubmitVO(QuestionSubmit questionSubmit, HttpServletRequest request);


    Page<QuestionSubmitVO> getQuestionSubmitVOPage(Page<QuestionSubmit> questionSubmitPage, HttpServletRequest request);

}
